import http from "@/utils/http.js";

export function getChapters(courseId) {
    return http({
        method:"GET",
        url:`/chapters/getChapterVideo/${courseId}`,
    })
}

// 添加章节
export function addChapter(data) {
    return http({
        method: "POST",
        url: "/chapters/addChapter",
        data,
    });
}

//删除章节
export function deletesChapter(chapterId) {
    return http({
        method: "DELETE",
        url: `/chapters/deleteChapter/${chapterId}`,
    })
}